import wyrequest from '@/utils/wyrequest'

const state = {
    recommendDetailList:[]
}
const mutations = {
    RECEIVE_RECOMMENDDETAILLIST(state,recommendDetailList){
        state.recommendDetailList = recommendDetailList
    }
}
const actions = {
    async getRecommendDetailList({commit}){
        console.log ("getRecommendDetailList请求函数执行了");
        const result = await wyrequest({
            url:"/item/list.json?__timestamp=1630133942864&categoryType=0&subCategoryId=1008009&categoryId=1005000",
            methods:'get'
        });
        commit("RECEIVE_RECOMMENDDETAILLIST",result.data.categoryItems.itemList)
    },
}
const getters = {}
export default {
    state,
    mutations,
    actions,
    getters
}